#pragma once

class CLogicCalendar
{
public:
    CLogicCalendar();
    ~CLogicCalendar();

    VOID    Reset();
    VOID    Tick();

    WORD    GetYear();
    WORD    GetMonth();
    WORD    GetDayOfWeek();
    WORD    GetDay();
    WORD    GetHour();
    WORD    GetMinute();
    WORD    GetSecond();
    WORD    GetMillisecond();

    WORD    GetLunarMonth();
    WORD    GetLunarDay();

protected:
    BOOL    _init();
    BOOL    _calc_lunar_date();
    LONG    _calc_diff_days();
    BOOL    _is_leap_year(WORD wYear);


private:
    SYSTEMTIME      m_oSystime;
    WORD            m_wLunarYear;
    WORD            m_wLunarMonth;
    WORD            m_wLunarDay;
};